<template>
  <div class="newsCenter">
    <!-- 新闻中心 -->
    <newslist v-if="hasExhibition" :newsData="newsData"></newslist>
    <detailedNews v-else></detailedNews>
  </div>
</template>

<script>
import newslist from "./newsList.vue"
import detailedNews from "./detailedNews.vue"
import globalhead from "../../components/global.vue"
export default {
  components: {
    globalhead,
    newslist,
    detailedNews
  },
  data() {
    return {
      mes: "新闻中心",
      hasExhibition: false,
      newsData: [
        {
          title: "面对俄罗斯对是哦阿萨德健康",
          content: "地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢掌握着主动权地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢面排一直牢牢面排一直牢牢",
          key: (((1 + Math.random()) * 0x10000) | 0).toString(16),
          linkto: "",
          user: {
            headportrait: require('../../assets/home-img/all-svg/samll-logo.png'),
            username: 'admin',
            sharelink: 'http://www.baidu.com'
          },

        },
        {
          title: "面对俄罗斯对是哦阿萨德健康",
          content: "地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢掌握着主动权地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢面排一直牢牢面排一直牢牢",
          key: (((1 + Math.random()) * 0x10000) | 0).toString(16),
          linkto: "",
          user: {
            headportrait: require('../../assets/home-img/all-svg/samll-logo.png'),
            username: 'admin',
            sharelink: 'http://www.baidu.com'
          },

        },
        {
          title: "面对俄罗斯对是哦阿萨德健康",
          content: "地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢掌握着主动权地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢面排一直牢牢面排一直牢牢",
          key: (((1 + Math.random()) * 0x10000) | 0).toString(16),
          linkto: "",
          user: {
            headportrait: require('../../assets/home-img/all-svg/samll-logo.png'),
            username: 'admin',
            sharelink: 'http://www.baidu.com'
          },

        },
        {
          title: "面对俄罗斯对是哦阿萨德健康",
          content: "地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢掌握着主动权地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢面排一直牢牢面排一直牢牢",
          key: (((1 + Math.random()) * 0x10000) | 0).toString(16),
          linkto: "",
          user: {
            headportrait: require('../../assets/home-img/all-svg/samll-logo.png'),
            username: 'admin',
            sharelink: 'http://www.baidu.com'
          },

        },
        {
          title: "面对俄罗斯对是哦阿萨德健康",
          content: "地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢掌握着主动权地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢面排一直牢牢面排一直牢牢",
          key: (((1 + Math.random()) * 0x10000) | 0).toString(16),
          linkto: "",
          user: {
            headportrait: require('../../assets/home-img/all-svg/samll-logo.png'),
            username: 'admin',
            sharelink: 'http://www.baidu.com'
          },

        },
        {
          title: "面对俄罗斯对是哦阿萨德健康",
          content: "地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢掌握着主动权地战胜俄。面对老对手俄罗斯女排，中国女排一直牢牢掌握着主动权地战胜俄。面排一直牢牢面排一直牢牢面排一直牢牢",
          key: (((1 + Math.random()) * 0x10000) | 0).toString(16),
          linkto: "",
          user: {
            headportrait: require('../../assets/home-img/all-svg/samll-logo.png'),
            username: 'admin',
            sharelink: 'http://www.baidu.com'
          },

        },
      ]
    }
  }
}
</script>
<style scoped lang="scss">
.newsCenter {
  width: 100%;
}
</style>